home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
boot
/
AllocFrags.readme
< prev
next >
Wrap
Text File
|
1997-11-02
|
3KB
|
50 lines
Short: Brutally remove small mem frags on 040/060 systems (+src)
Author: bernie@shock.cosmos.it (Bernardo Innocenti)
Uploader: bernie@shock.cosmos.it (Bernardo Innocenti)
Type: util/boot
Use the included AvailFrag program or a system monitor such as Scout
or XOper to determine if your system memory list has many small holes
of 8 to 256 bytes each. Lots of small chunks are usually made by badly
written programs (not freeing all the memory they allocated).
On systems equipped with 68040 or 68060 the program SetPatch will
load the 68060.library 68040.library at boot time. These libraries
will setup the MMU page descriptors to cover all addressable memory
space, including space reserved by Zorro boards. Unfortunately, the
040/060 MMUs require an 512-byte alignament for the descriptors,
even if they only take up 256 bytes. So they free up the remaining
256 bytes in order to give some memory back to the system. On my
Amiga 4000, which is fitted with four Zorro boards, this leaves more
than 500 memory chunks right after booting the system! Such a
fragmented memory list will slow down all AllocMem() and FreeMem()
calls because they need to scan almost the entire list before they
can reach the first memory chunk bigger than 256 byte.
Put AllocFrags anywhere in your Startup-Sequence after SetPatch.
It will remove from the memory list any chunks whose size is equal
or smaller than 256 bytes. Using AllocFrags frequently during your
normal system activity is not a good idea because it might cause
even more fragmentation in your memory list once you close a
program and it frees a memory block which was contiguous to one
already removed by AllocFrags.
I admit AllocFrags is a real hack and it WILL stop working when
the OS memory allocation engine is changed (e.g.: to accomodate
virtual or protected memory). Anyway, I'm sure that AllocFrags on
OS 2.0 upto 3.1 will not cause any incompatibilities or system
crashes. Inspect the source code if you don't believe me.
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
284 271 4.5% 18-Oct-97 19:20:14 +AllocFrags
1649 754 54.2% 18-Oct-97 18:29:58 +AllocFrags.c
1998 1033 48.2% 18-Oct-97 19:19:30 +AllocFrags.readme
970 446 54.0% 12-Oct-97 00:28:30 +AllocFrags.¶
174 125 28.1% 11-Oct-97 23:23:54 +SMakefile
-------- ------- ----- --------- --------
5075 2629 48.1% 20-Oct-97 00:03:16 5 files